<HTML>
<HEAD><TITLE>搜索结果</TITLE></HEAD>
<BODY>
<?php
  header('Content-Type:text/html;charset=utf-8');
  require_once 'class.php';
  PDOc::_connect();
  $pattern=$_POST['pattern'];
  //var_dump($pattern);
  session_start();
  $adminRank=$_SESSION['adminRank'];
  if ($pattern=='') {
  	PDOc::throwException('表达式不能为空！');
  	PDOc::Button('viewAllPassages.php','返回');
  } else {
  	if ($adminRank>=1) {
    	PDOc::super_searchPassage($pattern);
    } else {
    	PDOc::searchPassage($pattern);
    } 
  }
  PDOc::Button('viewAllPassages.php','返回');
?>
</BODY>
</HTML>